package com.groupbuying.weblogback.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;


/**
 * @author zmlmagic
 * @date 2019/10/8 11:58 AM
 * @company 蒙泰互联网公司
 * @des 用户端错误日志
 **/

@RestController
@RequestMapping("/usererror")
public class UserErrorLogController {
    private static final Logger logger = LoggerFactory.getLogger(UserErrorLogController.class);
    /**
     * @param {String} errorObj     错误的详细信息，Anything
     */
    @GetMapping("/create")
    public void create(String errorObj) {
        StringBuilder message = new StringBuilder();
        message.append("错误详情：" + errorObj);
        logger.error(message.toString());
    }
}
